package com.member.shop.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.member.common.annotation.Excel;
import com.member.common.core.domain.BaseEntity;
import com.member.shop.vo.SpecsData;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.math.BigDecimal;
import java.util.List;

/**
 * 订单商品对象 sys_biz_order_goods
 *
 * @author lixinchen
 * @date 2024-01-08
 */
@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_biz_order_goods")
public class SysBizOrderGoods extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 唯一id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 订单id
     */
    @Excel(name = "订单id")
    private Long orderId;

    /**
     * 商品id
     */
    @Excel(name = "商品id")
    private Long goodsId;

    /**
     * 商品名称
     */
    @Excel(name = "商品名称")
    private String goodsName;

    /**
     * 单价
     */
    @Excel(name = "单价")
    private BigDecimal unitPrice;

    /**
     * 总计
     */
    @Excel(name = "总计")
    private BigDecimal totalPrice;

    /**
     * 数量
     */
    @Excel(name = "数量")
    private Long number;

    /**
     * sku规格json
     */
    @Excel(name = "sku规格json")
    private String specsData;

    /**
     * sku图片
     */
    @Excel(name = "sku图片")
    private String skuPic;

    /**
     * 规格key
     */
    @Excel(name = "规格key")
    private String specsKey;

    /**
     * skuid
     */
    @Excel(name = "skuid")
    private Long skuId;

    /**
     * 是否删除 0  否 1是
     */
    @Excel(name = "是否删除 0  否 1是")
    private Integer delStatus;

    /**
     * 规格组合
     */
    @TableField(exist = false)
    private String specsName;

    private BigDecimal marketPrice;


    private String erpProductCode;


    //erp是否是最小单位(0:否,1.是)
    private Integer erpSmallUnit;


    /**
     * 优惠券的价格(平分后的价格)
     */
    @Excel(name = "优惠券的价格(平分后的价格)")
    private BigDecimal couponPrice;


    /**
     * 长单位数量
     */
    private Integer longUnitNumber;


}
